@include('common.header')
<link rel="stylesheet" href="{{ asset('/css/list.css') }}">
<link rel="stylesheet" href="{{ asset('/css/style.css') }}">
<link rel="stylesheet" href="{{ asset('/css/tip/demo.css') }}">


<div class="row" style="width:100%;margin-top:5%;" >
	<div class="col-md-5" >
		<nav style="margin-right:-200px;">
			<ol class="cd-breadcrumb custom-separator custom-icons" style="width:230px;" >
				<li><a href="{{ url('/') }}">首页</a></li>
				<li class="current"><a href="{{ url('/admin') }}">管理员列表</a></li>
			</ol>
		</nav>
	</div>
	<div class="col-md-7" style="text-align:left;margin-top:20px;">
		<!-- 搜索框 -->
		<form action="{{ url('/admin') }}" method='post'   >
			<div class="input-group" style="width:400px;"  >
				
				{{ csrf_field() }}
				<input  type="text" name='keyword' class="form-control" placeholder="输入职工名 ...." value="{{ $request or '' }}" style="border-radius:10px 0px 0px 10px;" />
				
				<span class="input-group-btn">
					<input class="btn btn-success" type="submit" value="Go!" />
					<a class="btn btn-default" href="{{ url('/admin') }}" style="border-radius:0px 10px 10px 0px;" />清空条件</a>
				</span>
				
			</div>
		</form>
	</div>
</div>


<!-- 用户表格 -->
<!-- class="bs-example" -->
<div  class="wrap" style="margin-top:2%;" >
	<!-- class="table table-hover" -->
    <table class="listtab" >
		<thead>
			<tr>
				<th></th>
				<th>编号</th>
				<th>职工</th>
				<th>上次登录时间</th>
				<th style="height:70px;" >
					<div class="dummytip dummytip-avatar" style="width:150px;">
						<div class="tooltippp tooltippp-effect-2">
							<a href="{{ url('/addAdmin') }}" style="text-decoration:none;">
								<h4>管理员</h4>
							</a>
							<span class="tooltippp-content">点击添加</span>
							<div class="tooltippp-shape">
								<svg viewBox="0 0 200 150" preserveAspectRatio="none">
									<polygon points="29.857,3.324 171.111,3.324 196.75,37.671 184.334,107.653 104.355,136.679 100,146.676 96.292,136.355 16.312,107.653 3.25,37.671"/>
								</svg>
							</div>
						</div>
					</div>
				</th>
			</tr>
		</thead>
		<tbody>
			@forelse($admin as $admin_info)
				<tr>
					<td></td>
					<td>{{ $admin_info->id }}</td>
					<td>{{ $admin_info->name }}</td>
					<td>{{ $admin_info->lasttime }}</td>
					<td>
						<a href="{{ url('/auth') }}/{{ $admin_info->id }}" style="font-size:13px;text-decoration:none;">分配权限</a>
						&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="{{ url('/addAdmin') }}/{{ $admin_info->id }}" style="font-size:13px;text-decoration:none;">编辑</a>
					</td>
				</tr>
			@empty
				<tr>
					<td scope="row"><h2>暂无数据</h2></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
			@endforelse
		</tbody>
    </table>
</div>


<!-- 分页 -->
<div style='text-align:center;'>
	{{ $admin->appends(['keyword'=>$request])->links() }}
</div>
<div class="badge" style="width:100%;text-align:center;font-size:18px;margin-bottom:70px;" >
		共{{ $admin->total() }}条数据
</div>


@extends('common.footer')

